<extend name="Base/ucenter_common"/>
<block name="body">
    <style>
        .form {
            margin-top: 30px;
        }

    </style>
    <div class="widget-box">
        <div class="widget-header">
            <h3>领队资料：</h3>
        </div>
        <div class="widget-body">
            <div class="row">
                <form class="form col-md-5 col-md-offset-3" action="{:U('user/team')}" method="post"
                      name="ey-change-form">
                    <input type="hidden" name="id" value="{$_team.id}">
                    <div class="form-group">
                        <label class="control-label">代表队名称</label>
                        <input class="form-control" type="text" placeholder="请输入代表队名称"
                               name="name" value="{$_team.name}">
                    </div>
                    <div class="form-group">
                        <label class="control-label">带队负责人</label>

                        <input class="form-control" type="text"
                               placeholder="请输入带队负责人名称"
                               name="user_name"
                               value="{$_team.user_name}">
                    </div>
                    <div class="form-group">
                        <label class="control-label">带队负责人联系方式</label>

                        <input class="form-control" type="text" placeholder="请输入负责人联系方式"
                               name="user_phone" value="{$_team.user_phone}">
                    </div>
                    <div class="form-group">
                        <label class="control-label">带队负责人QQ</label>

                        <input class="form-control" type="text" placeholder="请输入负责人QQ"
                               name="user_qq" value="{$_team.user_qq}">
                    </div>
                    <div class="form-group" style="margin-top: 20px;">
                        <button type="submit" class="btn btn-success btn-block">提交保存</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script>
        $(function () {
            $("form[name='ey-change-form']").bind('submit', function (e) {
                e.preventDefault();
                var _self = this;
                $.post($(this).attr('action'), $(this).serialize(), function (ret) {
                    layer.msg(ret.info);
                }, 'json');
            });
        })
    </script>
</block>